export const scoreSetConfig = {
  "type": "crud",
  "name":"11",
  "syncLocation": false,
  "api": {
    "method": "get",
    "url": "http://localhost:8080/manual_scores/paper_list"
  },
  "filterColumnCount": 3,
  "filter": {
    "title": "查询",
    "body": [
      {
        "type": "group",
        "body": [
          {
            "type": "input-text",
            "name": "id",
            "label": "试卷ID",
            "clearable": true,
            "size": "sm",
            "id": "u:e059f3565437",
          },
          {
            type: "select",
            label: "试卷总分",
            name: "sumScore",

            options: [
              {
                label: "所有",
                value: "0",
              },
              {
                label: "未设置",
                value: "1",
              },
              {
                label: "已设置",
                value: "2",
              },
            ],
            id: "u:b3fe7a62c54c",
            multiple: false,
            value: "0",
            placeholder: "-",
          },
        ],
        "id": "u:acebf078ad59",
      },
    ],
    "actions": [
      {
        "type": "submit",
        "level": "primary",
        "label": "查询",
        "id": "u:dcf97f13741b",
      },
    ],
    "id": "u:b01098e45095",
  },
  "filterTogglable": true,
  "columns": [
    {
      "type": "text",
      "id": "u:3eddb86f3a92",
      "placeholder": "-",
      "label": "试卷ID",
      "name": "id"
    },
    {
      "type": "text",
      "id": "u:e22f9e2810b6",
      "label": "试卷名",
      "placeholder": "-",
      "name": "name"
    },
    {
      "type": "text",
      "id": "u:8cf6f9d38935",
      "label": "题目总数",
      "placeholder": "-",
      "name": "questionNum"
    },
    {
      "type": "text",
      "id": "u:ab83fd5fcdf6",
      "label": "总分",
      "body": {
      },
      "placeholder": "-",
      "name": "sumScore"
    },
    {
      "type": "text",
      "id": "u:a803584f0c8b",
      "label": "创建时间",
      "body": {
      },
      "placeholder": "-",
      "name": "createTime"
    },
    {
      "type": "operation",
      "label": "操作",
      "buttons": [
        {
          "label": "编辑",
          "name":"set",
          "type": "button",
          "actionType": "dialog",
          "level": "link",
          "reload": "11",
          "dialog": {
            "title":"请设置分数",
            "size": "lg",
            "body": [
              {
                "type": "crud",
                "syncLocation": false,
                "api": {
                  "method": "get",
                  "url": "http://localhost:8080/manual_scores/question_list/$id",
                  "requestAdaptor": "",
                  "adaptor": 
                    "const map = {\r\n  'blank': '填空题',\r\n  'select': '选择题',\r\n  'picture': '主观题'\r\n}\r\nconst questionList = payload.data.questionList.map(v => ({ ...v, type: map[v.type] }));\r\nreturn { questionList }",
                  "messages": {
                  },
                  "dataType": "json"
                }, 
                "quickSaveApi": {
                  "method":"Put",
                  "url":"http://localhost:8080/manual_scores/set_score/$id",
                  "dataType": "json"
                },
                "columns": [
                  {
                    "name": "titleNo",
                    "label": "题号",
                    "type": "text",
                    "id": "u:1df3307a90b3"
                  },
                  {
                    "name": "content",
                    "label": "内容",
                    "type": "text",
                    "id": "u:624bfbb123f9",
                    popOver: {
                      type: "panel",
                      title: "题目详情",
                      body: [
                        {
                          type: "tpl",
                          tpl: "${content}",
                          wrapperComponent: "",
                          inline: false,
                          id: "u:8241c6dd0e5c",
                          hiddenOn: "${STARTSWITH(content, 'http')}",
                        },
                      ],
                      id: "u:f3242260fd48",
                      actions: [
                        {
                          type: "flex",
                          id: "u:b76e50629a7e",
                          className: "p-1",
                          items: [
                            {
                              type: "container",
                              body: [
                                {
                                  type: "image",
                                  id: "u:a588c87c8810",
                                  width: 100,
                                  height: 242,
                                  enlargeAble: true,
                                  imageMode: "original",
                                  src: "",
                                  hiddenOn: "${!STARTSWITH(content, 'http')}",
                                  thumbRatio: "4:3",
                                  className: "",
                                  thumbClassName: "",
                                  imageClassName: "image-amis",
                                },
                              ],
                              size: "xs",
                              style: {
                                position: "static",
                                display: "block",
                                flex: "1 1 auto",
                                flexGrow: 1,
                                flexBasis: "auto",
                              },
                              wrapperBody: false,
                              isFixedHeight: false,
                              isFixedWidth: false,
                              id: "u:1bbc9b245ce4",
                            },
                          ],
                          style: {
                            position: "relative",
                            inset: "auto",
                            flexWrap: "nowrap",
                            width: "100%",
                            overflowX: "auto",
                            margin: "0",
                            height: "100%",
                            overflowY: "auto",
                          },
                          isFixedHeight: true,
                          isFixedWidth: true,
                        },
                      ],
                      affixFooter: false,
                      hidden: false,
                      mode: "dialog",
                    }
                  },
                  {
                    "type": "text",
                    "label": "类型",
                    "name": "type",
                    "id": "u:b49c9470cf9c"
                  },
                  {
                    "type": "text",
                    "label": "分数",
                    "name": "score",
                    "id": "u:10772f03636b",
                    "quickEdit": {
                      "type": "input-number",
                      "mode": "inline",
                      "size": "xs",
                      "max":100,
                      "min":1,
                    }
                  },
                  {
                    "type": "text",
                    "label": "答案",
                    "name": "answer",
                    "id": "u:c85149ec8668",
                    "placeholder": "-",
                    popOver: {
                      type: "panel",
                      title: "答案详情",
                      body: [
                        {
                          type: "tpl",
                          tpl: "${answer}",
                          wrapperComponent: "",
                          inline: false,
                          id: "u:8241c66d0e5c",
                          hiddenOn: "${STARTSWITH(answer, 'http')}",
                        },
                      ],
                      id: "u:f3242240fd48",
                      actions: [
                        {
                          type: "flex",
                          id: "u:b76e5062947e",
                          className: "p-1",
                          items: [
                            {
                              type: "container",
                              body: [
                                {
                                  type: "image",
                                  id: "u:a588c87c8840",
                                  width: 100,
                                  height: 242,
                                  enlargeAble: true,
                                  imageMode: "original",
                                  src: "",
                                  hiddenOn: "${!STARTSWITH(answer, 'http')}",
                                  thumbRatio: "4:3",
                                  className: "",
                                  thumbClassName: "",
                                  imageClassName: "image-amis",
                                },
                              ],
                              size: "xs",
                              style: {
                                position: "static",
                                display: "block",
                                flex: "1 1 auto",
                                flexGrow: 1,
                                flexBasis: "auto",
                              },
                              wrapperBody: false,
                              isFixedHeight: false,
                              isFixedWidth: false,
                              id: "u:1bbc9b245ce2",
                            },
                          ],
                          style: {
                            position: "relative",
                            inset: "auto",
                            flexWrap: "nowrap",
                            width: "100%",
                            overflowX: "auto",
                            margin: "0",
                            height: "100%",
                            overflowY: "auto",
                          },
                          isFixedHeight: true,
                          isFixedWidth: true,
                        },
                      ],
                      affixFooter: false,
                      hidden: false,
                      mode: "dialog",
                    }
                  }
                ],
                "bulkActions": [
                ],
                "itemActions": [
                ],
                "id": "u:63b6513fc106",
                "perPageAvailable": [
                  10
                ],
                "messages": {
                },
                "footerToolbar": [
                ]
              }
            ]
          },
          "id": "u:e237569f0ea6"
        },
        {
          "label": "删除",
          "type": "button",
          "actionType": "ajax",
          "level": "link",
          "id": "u:cc38396f32e3",
          "className": "text-danger",
          "confirmText": "确定要删除？",
          "api": {
            "method": "delete",
            "url": "http://localhost:8080/manual_scores/$id"
          }
        }
      ],
      "id": "u:c4d4baeeb32c"
    }
  ],
  "bulkActions": [
  ],
  "itemActions": [
  ],
  "features": [
    "update"
  ],
  "id": "u:9379f8469f05",
  "perPageAvailable": [
    10
  ],
  "messages": {
  },
  "autoFillHeight": true,
  "keepItemSelectionOnPageChange": false,
  "perPage": 10,
  "dataType": "json",
  "data": {
    "&": "$$",
    "pageNum": 1,
    "pageSize": 10
  },
  "footerToolbar": [
    {
      "type": "statistics",
      "tpl": "内容",
      "wrapperComponent": "",
    },
    {
      "type": "pagination",
      "tpl": "内容",
      "wrapperComponent": ""
    }
  ],
  "headerToolbar": [
    "reload",
    "filter-toggler"
  ],
}